package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhPartsQrcodeApplyMapper;
import com.ruoyi.zsyh.domain.ZsyhPartsQrcodeApply;
import com.ruoyi.zsyh.service.IZsyhPartsQrcodeApplyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 产品补助金申请记录Service业务层处理
 * 
 * @author yuexl
 * @date 2022-01-13
 */
@Service
public class ZsyhPartsQrcodeApplyServiceImpl implements IZsyhPartsQrcodeApplyService 
{
    @Autowired
    private ZsyhPartsQrcodeApplyMapper zsyhPartsQrcodeApplyMapper;

    /**
     * 查询产品补助金申请记录
     * 
     * @param id 产品补助金申请记录ID
     * @return 产品补助金申请记录
     */
    @Override
    public ZsyhPartsQrcodeApply selectZsyhPartsQrcodeApplyById(String id)
    {
        return zsyhPartsQrcodeApplyMapper.selectZsyhPartsQrcodeApplyById(id);
    }

    public ZsyhPartsQrcodeApply selectZsyhPartsQrcodeApplyByQrCodeId(String qrCodeId){
        return zsyhPartsQrcodeApplyMapper.selectZsyhPartsQrcodeApplyByQrCodeId(qrCodeId);
    }

    /**
     * 查询产品补助金申请记录列表
     * 
     * @param zsyhPartsQrcodeApply 产品补助金申请记录
     * @return 产品补助金申请记录
     */
    @Override
    public List<ZsyhPartsQrcodeApply> selectZsyhPartsQrcodeApplyList(ZsyhPartsQrcodeApply zsyhPartsQrcodeApply)
    {
        return zsyhPartsQrcodeApplyMapper.selectZsyhPartsQrcodeApplyList(zsyhPartsQrcodeApply);
    }

    /**
     * 新增产品补助金申请记录
     * 
     * @param zsyhPartsQrcodeApply 产品补助金申请记录
     * @return 结果
     */
    @Override
    public int insertZsyhPartsQrcodeApply(ZsyhPartsQrcodeApply zsyhPartsQrcodeApply)
    {
        zsyhPartsQrcodeApply.setCreateTime(DateUtils.getNowDate());
        return zsyhPartsQrcodeApplyMapper.insertZsyhPartsQrcodeApply(zsyhPartsQrcodeApply);
    }

    /**
     * 修改产品补助金申请记录
     * 
     * @param zsyhPartsQrcodeApply 产品补助金申请记录
     * @return 结果
     */
    @Override
    public int updateZsyhPartsQrcodeApply(ZsyhPartsQrcodeApply zsyhPartsQrcodeApply)
    {
        return zsyhPartsQrcodeApplyMapper.updateZsyhPartsQrcodeApply(zsyhPartsQrcodeApply);
    }

    /**
     * 删除产品补助金申请记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPartsQrcodeApplyByIds(String ids)
    {
        return zsyhPartsQrcodeApplyMapper.deleteZsyhPartsQrcodeApplyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除产品补助金申请记录信息
     * 
     * @param id 产品补助金申请记录ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPartsQrcodeApplyById(String id)
    {
        return zsyhPartsQrcodeApplyMapper.deleteZsyhPartsQrcodeApplyById(id);
    }
}
